/*
 * Project: Sudoku Hint Engine for Android
 * Copyright (C) 2010-2013 Emanuel Moecklin
 * 
 * Available under the terms of the Lesser General Public License (LGPL)
 */
package com.onegravity.sudoku.solver.checks;

import com.onegravity.sudoku.solver.core.Hint;

/**
 * This exception is thrown during analysis to indicate that something went wrong
 * (e.g. no hints found to solve the puzzle or the puzzle is not valid) 
 * @author Emanuel Moecklin
 */

/*
 * - AnalysisResult: analysis successfully performed
 * - AnalysisFailed: analysis could not find a solution with the available solving techniques
 * - IncorrectDigitHint: incorrect digits found
 * - IncorrectPencilMarksHint: incorrect pencil marks found
 * - TooFewGivensHint: puzzle doesn't have enough givens
 * - NoSolutionHint: puzzle has no solution
 * - MultipleSolutionsHint: puzzle has multiple solutions
 * - DifficultyBeyondNightmare: puzzle is too difficult to analyze (performance)
*/

public class AnalysisException extends Exception {

	private static final long serialVersionUID = -8350991310353238441L;

	public enum Type {
		ANALYSIS_FAILED,		// analyzer could not solve the puzzle
		INVALID_DIFFICULTY,		// puzzle too hard to analyze (beyond nightmare...)
		INVALID_PUZZLE			// puzzle is somehow not valid (incorrect digits, no solution etc.)
	}

	private Type type;
	private Hint hint;
	
	public AnalysisException(Type type, Hint hint) {
		this.type = type;
		this.hint = hint;
	}
	
	public Type getType() {
		return type;
	}
	
	public Hint getHint() {
		return hint;
	}
	
}
